<div class="CartWrap">
<div class="FormWrap " style="background:#F5F4EC; border:1px solid #E5DDC7;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="liststyle data">
            <col class="span-auto ColColorBlue"></col>
            <col class="span-5 ColColorGray"></col>
            <col class="span-4 ColColorGray "></col>
  <tr>
    <td><h4><{t}>订单编号：<{/t}><{$order.order_id}><{if $order.status=='finish'}><label style="color:#f00;"><{t}>（已完成）<{/t}></label><{elseif $order.status=='dead'}><label style="color:#f00;"><{t}>（已作废）<{/t}></label><{/if}></h4></td>
    <td><{t}>下单日期：<{/t}><{$order.acttime|cdate:FDATE_STIME}></td>
    <td>状态：<{if $order.pay_status==0}>未付款<{elseif $order.pay_status==1}>已付款<{elseif $order.pay_status==2}>已付款至担保方<{elseif $order.pay_status==3}>部分付款<{elseif $order.pay_status==4}>部分退款<{elseif $order.pay_status==5}>已退款<{/if}>
  [<{if $order.ship_status==0}>未发货<{elseif $order.ship_status==1}>已发货<{elseif $order.ship_status==2}>部分发货<{elseif $order.ship_status==3}>部分退货<{elseif $order.ship_status==4}>已退货<{/if}>]</td>
  </tr>
</table>




</div>
<div class="FormWrap " style="background:#F5F4EC; border:1px solid #E5DDC7;">
<{if count($order.items) > 0}>

  <h4><{t}>购买的商品<{/t}></h4>

<div class="division">
<table width="100%" cellpadding="3" cellspacing="0" class="liststyle">
            <col class='span-auto'></col>
            <col class="span-auto"></col>
            <col class="span-2"></col>
            <col class="span-2"></col>
            <col class="span-3"></col>
            <col class="span-2 ColColorOrange"></col>
  <thead>
  <tr>
        <th><{t}>图片<{/t}></th>
        <th><{t}>商品名称<{/t}></th>
        <th><{t}>商品积分<{/t}></th>
        <th><{t}>价格<{/t}></th>
        <th><{t}>数量<{/t}></th>
        <th><{t}>小计<{/t}></th>
      </tr>
  </thead>
  <tbody>
  <{foreach from=$order.items item="item" key="key"}>
  <tr>
    <td>
                  <div class='product-list-img' isrc="<{$item.thumbnail_pic|default:$env.conf.site.default_thumbnail_pic|storager}>" ghref='<{link ctl=product act="index" arg0=$item.goods_id}>' style='width:50px;height:50px;'>
                <img src='statics/loading.gif'/>
          </div>
    </td>
    <td><a <{if $item.is_type == 'goods'}>href="<{link ctl="product" act=index arg0=$item.goods_id}>"<{else}>href="<{link ctl="package" act=index}>"<{/if}> target="_blank">
        <{$item.name}>
      <{foreach from=$item.minfo item=minfo key=name}>
          <br><{$minfo.label}>：<{$minfo.value}>
          <{/foreach}>
      <{$item.addon.adjname}></a></td>
    <td><{$item.score}>&nbsp;</td>
    <td><{$item.price|cur}></td>
    <td><{$item.nums}></td>
    <td><{$item.amount|cur}></td>
  </tr>
  <{/foreach}>

  </tbody>
</table>
</div>
<{if  count($trading.pmt_o.list)>0 || count($trading.gift_p)>0 || count($trading.coupon_p)>0}>
    <div class="division">
  <table width="100%" cellpadding="0" cellspacing="0" class="liststyle data">
        <col class="span-4 ColColorGray"></col>
            <col class="span-auto"></col>

        <{if count($trading.pmt_o.list)>0}>
      <tr>
        <th><{t}>享受的优惠：<{/t}></th>
                <td>
                     <ol>
            <{foreach from=$trading.pmt_o.list item=item}>
            <li><{$item.pmt_describe}></li>
            <{/foreach}>
                    </ol>
        </td>
      </tr>
            <{/if}>
            <{if count($trading.gift_p)>0}>
            <tr>
              <th><{t}>获得赠品：<{/t}></th>
              <td>
              <ol>
              <{foreach from=$trading.gift_p item="item" key="key"}>
          <li><{$item.name}> <{$item.nums}><{t}> 件&nbsp;&nbsp;<{/t}></li>
        <{/foreach}>
                </ol>
                </td>
            </tr>
            <{/if}>
            <{if count($trading.coupon_p)>0}>
            <tr>
              <th><{t}>获得优惠券：<{/t}></th>
              <td>
              <ol>
                  <{foreach from=$trading.coupon_p item="item" key="key"}>
                  <li><{$item.cpns_name}> <{$item.nums}><{t}> 张<{/t}></li>
                  <{/foreach}>
              </ol></td>
            </tr>
            <{/if}>
  </table>
    </div>
    <{/if}>

<{/if}>

<{if $order.giftItems}>

  <h4><{t}>赠品<{/t}></h4>

<div class="division">
<table width="100%" cellpadding="3" cellspacing="0" class="liststyle data">
            <col class="span-auto"></col>
            <col class="span-2"></col>
            <col class="span-2"></col>
            <col class="span-2 ColColorOrange"></col>
    <thead>
      <tr>
        <th ><{t}>赠品名称<{/t}></th>
        <th><{t}>所需积分<{/t}></th>
        <th><{t}>数量<{/t}></th>
        <th><{t}>小计<{/t}></th>
      </tr>
    </thead>
    <tbody>
    <{foreach from=$order.giftItems item="item" key="key"}>
      <tr>
        <td><{$item.name}></td>
        <td><{$item.point}></td>
        <td><{$item.nums}></td>
        <td><{$item.amount}></td>
      </tr>
    <{/foreach}>
    </tbody>
</table>
</div>
<{/if}>
<h4><{t}>收货人信息<{/t}></h4>
<div class="division">
<table width="100%" cellspacing="0" cellpadding="0" class="liststyle data">
  <tr>
    <th><{t}>收货人姓名:<{/t}></th>
    <td><{$order.receiver.name|escape:'html'}></td>
    <th ><{t}>收货人Mail:<{/t}></th>
    <td><{$order.receiver.email|escape:'html'}></td>
  </tr>
  <tr>
    <th><{t}>配送地区:<{/t}></th>
    <td><{$order.receiver.area|region}></td>
    <th><{t}>联系电话:<{/t}></th>
    <td><{$order.receiver.tel}><{if $order.receiver.tel && $order.receiver.mobile}> | <{/if}><{$order.receiver.mobile}></td>
  </tr>
  <tr>
    <th><{t}>收货人邮编:<{/t}></th>
    <td><{$order.receiver.zip|default:'-'|escape:'html'}></td>
    <th><{t}>送货时间:<{/t}></th>
    <td><{$order.shipping.time}></td>
  </tr>
    <tr>
    <th><{t}>配送方式:<{/t}></th>
    <td><{$order.shipping.method}></td>
    <th><{t}>付款方式:<{/t}></th>
    <td>
		<{$order.paymethod}>
		&nbsp;
		<{foreach from=$order.extendCon item=item key=key}>
			<{$item}>&nbsp;&nbsp;
		<{/foreach}>
	</td>
  </tr>
  <!--
  <tr>
  <th><{t}>物流公司:<{/t}></th>
    <td><{$order.corp.name}></td>
    <th><{t}>公司网址:<{/t}></th>
    <td><a href='<{$order.corp.website}>' target='_blank'><{$order.corp.website}></a></td>
  </tr>  !-->
  <tr>
    <th><{t}>商品重量:<{/t}></th>
    <td><{$order.weight}> g</td>
    <th><{t}>支付币别:<{/t}></th>
    <td><{$order.cur_name}></td>
  </tr>
  <tr>
    <th valign="top"><{t}>收货人地址:<{/t}></th>
    <td colspan="3" valign="top"><{$order.receiver.addr|escape:'html'}></td>
  </tr>
  <tr>
    <th valign="top"><{t}>订单附言:<{/t}></th>
    <td colspan="3" valign="top"><{$order.memo}></td>
  </tr>
</table>

</div>



</div>
<table border="0" cellspacing="0" cellpadding="0" class="liststyle data" width="100%">
            <col class="span-auto ColColorGray"></col>
            <col class="span-4 ColColorOrange textright"></col>
  <tr>
    <th><{t}>商品总金额:<{/t}></th>
    <td><{$order.basic.totalPrice|cur}></td>
  </tr>
  <tr>
    <th><{t}>配送费用:<{/t}></th>
    <td><{$order.shipping.cost|cur}></td>
  </tr>
  <{if $order.shipping.is_protect == 'true'}>
  <tr>
    <th><{t}>保价费用:<{/t}></th>
    <td><{$order.shipping.protect|cur}></td>
  </tr>
  <{/if}>
  <{if $order.amount.cost_payment > 0}>
  <tr>
    <th><{t}>支付费用:<{/t}></th>
    <td><{$order.amount.cost_payment|cur}></td>
  </tr>
  <{/if}>
  <{if $order.order_chgpointmoney > 0}>
  <tr>
    <th><{t}>积分抵扣金额:<{/t}></th>
    <td><{$order.order_chgpointmoney}></td>
  </tr>
  <{/if}>
  <tr>
    <th><{t}>您可获得积分:<{/t}></th>
    <td><{$order.score_g+0}></td>
  </tr>
  <{if $order.amount.pmt_amount > 0}>
  <tr>
    <th><{t}>优惠金额:<{/t}></th>
    <td style="color:#f00;">-<{$order.amount.pmt_amount|cur}></td>
  </tr>
  <{/if}>
  <{if $order.is_tax == 'true'}>
  <tr>
    <th><{t}>税金:<{/t}></th>
    <td><{$order.cost_tax|cur}></td>
  </tr>
  <tr>
    <th><{t}>发票抬头:<{/t}></th>
    <td><{$order.tax_company|escape:'html'}></td>
  </tr>
  <{/if}>
  <{if $order.discount != 0}>
  <tr>
    <th><{if $order.discount lt 0 }><{t}>订单减免：<{/t}> <{else}> <{t}>订单涨价：<{/t}><{/if}></th>
	<td style="color:#f00;"><{$order.discount|abs|cur}></td>
  </tr>
  <{/if}>
  <tr>
    <th><{t}>订单总金额:<{/t}></th>
    <td class="price1"><{$order.amount.total|amount}></td>
  </tr>
  <{if $order.amount.payed > 0}>
  <tr>
    <th><{t}>已付金额:<{/t}></th>
    <td><{$order.amount.payed|cur}></td>
  </tr>
  <{/if}>
  <{if $order.cur_rate != 1}>
  <tr>
    <th><{t}>货币汇率:<{/t}></th>
    <td><{$order.cur_rate}></td>
  </tr>
  <tr>
    <th><{t}>货币结算金额:<{/t}></th>
    <td><{$order.amount.final|cur:$order.currency:false:true}></td>
  </tr>
  <{/if}>
</table>
</div>

<script>
/*小图mouseenter效果*/
window.addEvent('domready',function(){

  var cart_product_img_viewer=new Element('div',{styles:{'position':'absolute','zIndex':500,'opacity':0,'border':'1px #666 solid'}}).inject(document.body);
  
  var cpiv_show=function(img,event){
       
      if(!img)return;
      cart_product_img_viewer.empty().adopt($(img).clone().removeProperties('width','height').setStyle('border','1px #fff solid')).fade(1);
      
      var size = window.getSize(), scroll = window.getScroll();
        var tip = {x: cart_product_img_viewer.offsetWidth, y: cart_product_img_viewer.offsetHeight};
        var props = {x: 'left', y: 'top'};
        for (var z in props){
            var pos = event.page[z] + 10;
            if ((pos + tip[z] - scroll[z]) > size[z]) pos = event.page[z] - 10 - tip[z];
            cart_product_img_viewer.setStyle(props[z], pos);
        }
  
  };
  
   $$('.product-list-img').each(function(i){
  
       new Asset.image(i.get('isrc'),{onload:function(img){
	   if(!img)return;
           var _img=img.zoomImg(50,50);
		     if(!_img)return;
           _img.setStyle('cursor','pointer').addEvents({
              'mouseenter':function(e){
                 cpiv_show(_img,e);
              },
              'mouseleave':function(e){
                cart_product_img_viewer.fade(0);
              }
           });
           i.empty().adopt(new Element('a',{href:i.get('ghref'),target:'_blank',styles:{border:0}}).adopt(_img));                 
       },onerror:function(){
            i.empty();
		
       }});
   
   });
   
   
});
</script>